﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Shop.Core.Domain.Catalog
{
    /// <summary>
    /// Represents a product review
    /// </summary>
    public partial class ProductReview : BaseEntity<long>
    {
        //private ICollection<ProductReviewHelpfulness> _productReviewHelpfulnessEntries;

        /// <summary>
        /// Gets or sets the product identifier
        /// </summary>
        public virtual int ProductId
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the title
        /// </summary>
        public virtual string Title
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the review text
        /// </summary>
        public virtual string ReviewText
        {
            get;
            set;
        }

        /// <summary>
        /// Review rating
        /// </summary>
        public virtual int Rating
        {
            get;
            set;
        }

        /// <summary>
        /// Review helpful votes total
        /// </summary>
        public virtual int HelpfulYesTotal
        {
            get;
            set;
        }

        /// <summary>
        /// Review not helpful votes total
        /// </summary>
        public virtual int HelpfulNoTotal
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the product
        /// </summary>
        public virtual Product Product
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the entries of product review helpfulness
        /// </summary>
        //public virtual ICollection<ProductReviewHelpfulness> ProductReviewHelpfulnessEntries
        //{
        //    get
        //    {
        //        return _productReviewHelpfulnessEntries ?? (_productReviewHelpfulnessEntries = new List<ProductReviewHelpfulness>());
        //    }
        //    protected set
        //    {
        //        _productReviewHelpfulnessEntries = value;
        //    }
        //}
    }
}
